Optimal. Leaf size=67 \[ -\frac {2 (c+d x) \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b}+\frac {i d \text {Li}_2\left (-e^{i (a+b x)}\right )}{b^2}-\frac {i d \text {Li}_2\left (e^{i (a+b x)}\right )}{b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {4268, 2317,
2438} \begin {gather*} \frac {i d \text {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {i d \text {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {2 (c+d x) \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2317
Rule 2438
Rule 4268
Rubi steps
\begin {align*} \int (c+d x) \csc (a+b x) \, dx &=-\frac {2 (c+d x) \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {d \int \log \left (1-e^{i (a+b x)}\right ) \, dx}{b}+\frac {d \int \log \left (1+e^{i (a+b x)}\right ) \, dx}{b}\\ &=-\frac {2 (c+d x) \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b}+\frac {(i d) \text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^2}-\frac {(i d) \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^2}\\ &=-\frac {2 (c+d x) \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b}+\frac {i d \text {Li}_2\left (-e^{i (a+b x)}\right )}{b^2}-\frac {i d \text {Li}_2\left (e^{i (a+b x)}\right )}{b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 134, normalized size = 2.00 \begin {gather*} -\frac {c \log \left (\cos \left (\frac {a}{2}+\frac {b x}{2}\right )\right )}{b}+\frac {c \log \left (\sin \left (\frac {a}{2}+\frac {b x}{2}\right )\right )}{b}+\frac {d \left ((a+b x) \left (\log \left (1-e^{i (a+b x)}\right )-\log \left (1+e^{i (a+b x)}\right )\right )-a \log \left (\tan \left (\frac {1}{2} (a+b x)\right )\right )+i \left (\text {Li}_2\left (-e^{i (a+b x)}\right )-\text {Li}_2\left (e^{i (a+b x)}\right )\right )\right )}{b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 123 vs. \(2 (59 ) = 118\).
time = 0.01, size = 124, normalized size = 1.85
method | result | size |
derivativedivides | \(\frac {-\frac {d a \ln \left (\csc \left (b x +a \right )-\cot \left (b x +a \right )\right )}{b}+c \ln \left (\csc \left (b x +a \right )-\cot \left (b x +a \right )\right )+\frac {d \left (\left (b x +a \right ) \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right )-\left (b x +a \right ) \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right )+i \dilog \left ({\mathrm e}^{i \left (b x +a \right )}+1\right )-i \dilog \left (1-{\mathrm e}^{i \left (b x +a \right )}\right )\right )}{b}}{b}\) | \(124\) |
default | \(\frac {-\frac {d a \ln \left (\csc \left (b x +a \right )-\cot \left (b x +a \right )\right )}{b}+c \ln \left (\csc \left (b x +a \right )-\cot \left (b x +a \right )\right )+\frac {d \left (\left (b x +a \right ) \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right )-\left (b x +a \right ) \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right )+i \dilog \left ({\mathrm e}^{i \left (b x +a \right )}+1\right )-i \dilog \left (1-{\mathrm e}^{i \left (b x +a \right )}\right )\right )}{b}}{b}\) | \(124\) |
risch | \(-\frac {2 c \arctanh \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b}+\frac {d \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x}{b}+\frac {d \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{2}}-\frac {i d \polylog \left (2, {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {d \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x}{b}-\frac {d \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) a}{b^{2}}+\frac {i d \polylog \left (2, -{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}+\frac {2 d a \arctanh \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}\) | \(151\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 175 vs. \(2 (55) = 110\).
time = 0.34, size = 175, normalized size = 2.61 \begin {gather*} -\frac {2 i \, b d x \arctan \left (\sin \left (b x + a\right ), -\cos \left (b x + a\right ) + 1\right ) - 2 i \, b c \arctan \left (\sin \left (b x + a\right ), \cos \left (b x + a\right ) - 1\right ) - 2 \, {\left (-i \, b d x - i \, b c\right )} \arctan \left (\sin \left (b x + a\right ), \cos \left (b x + a\right ) + 1\right ) - 2 i \, d {\rm Li}_2\left (-e^{\left (i \, b x + i \, a\right )}\right ) + 2 i \, d {\rm Li}_2\left (e^{\left (i \, b x + i \, a\right )}\right ) + {\left (b d x + b c\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \cos \left (b x + a\right ) + 1\right ) - {\left (b d x + b c\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \cos \left (b x + a\right ) + 1\right )}{2 \, b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 252 vs. \(2 (55) = 110\).
time = 0.38, size = 252, normalized size = 3.76 \begin {gather*} \frac {-i \, d {\rm Li}_2\left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) + i \, d {\rm Li}_2\left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) - i \, d {\rm Li}_2\left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) + i \, d {\rm Li}_2\left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) - {\left (b d x + b c\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) - {\left (b d x + b c\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) + {\left (b c - a d\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) + {\left (b c - a d\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) - \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) + {\left (b d x + a d\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) + {\left (b d x + a d\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right )}{2 \, b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (c + d x\right ) \csc {\left (a + b x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {c+d\,x}{\sin \left (a+b\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________